
/**
 * @param {JSEvent} event the event that triggered the action
 * @param {String} frm
 *
 * @properties={typeid:24,uuid:"9E0865A2-E7D7-40BA-B586-08D1C29B7BC3"}
 */
function btn_salir(event, frm) {
	
	forms[frm].controller.show();
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"53E1B363-B796-42A2-97C6-93B402DAAF53"}
 */
function btn_aceptar(event) {
	
	globals.saveFoundset(foundset);
	var frm = controller.getName();
	if (forms[frm].hide_btn_reset_fields)
		forms[frm].hide_btn_reset_fields();
	
	return true;
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"078E5C35-A030-41F7-A1E9-9D3323759E7F"}
 */
function btn_baja(event) {
}

/**
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"48A5D4B4-3858-48B9-A46B-10F47B26D2F1"}
 */
function btn_cancelar(event) {

	globals.cancel_record(foundset);
	hide_btn_reset_fields(event);
}


/**
 * @param {JSEvent} event
 * 
 * @properties={typeid:24,uuid:"8797D6AA-AE51-4407-ACB8-F2031A3CEB23"}
 */
function doEdit(event){
	
	elements.btn_aceptar.visible = true;
	elements.btn_cancelar.visible = true;
	elements.btn_editar.visible = false;
	elements.btn_eliminar.visible = false;
	elements.btn_salir.enabled = false;
	globals.doEdit(controller.getName());
}

/**
 * @param {JSEvent} event
 *
 * @properties={typeid:24,uuid:"C8FDE93A-5D16-478C-9775-D04CB43451AF"}
 */
function hide_btn_reset_fields(event){
	
	elements.btn_aceptar.visible = false;
	elements.btn_cancelar.visible = false;
	elements.btn_editar.visible = true;
	elements.btn_eliminar.visible = true;
	elements.btn_salir.enabled = true;
	globals.hide_btn_reset_fields(controller.getName());
}